<template>
  <div>
    <van-nav-bar title="我的收藏" left-arrow @click-left="$router.back()" />
    <newsItem v-for="item in newArr" :key="item.id" :obj="item"></newsItem>
    <van-swipe-cell>
      <van-card
        num="2"
        price="2.00"
        desc="描述信息"
        title="商品标题"
        class="goods-card"
        thumb="https://img01.yzcdn.cn/vant/cat.jpeg"
      />
      <template #right>
        <van-button square text="删除" type="danger" class="delete-button" />
      </template>
    </van-swipe-cell>
  </div>
</template>

<script>
import { user_star } from "@/api/news";
export default {
  data() {
    return {
      newArr: [],
    };
  },
  created() {
    this.getUser_stat();
  },
  methods: {
    getUser_stat() {
      user_star().then((res) => {
        console.log(res);
        this.newArr = res.data.data;
      });
    },
  },
};
</script>

<style>
</style>